import axios from 'axios'


// const BASEURL= 'http://localhost:8080/'
const BASEURL = 'http://localhost:8080/admin/'

const instance = axios.create({
    baseURL: BASEURL
})

instance.interceptors.request.use(
    function(config) {
        return config
    },
    function(error) {
        return Promise.reject(error)
    }
)

instance.interceptors.response.use(
    function(response) {
        return response.data
    },
    function(error) {
        return Promise.reject(error)
    }
)

export default instance